<!-- include Cycle plugin -->
<script type="text/javascript" src="assets/jquery.cycle.all.latest.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $('#testimonials1').before('<div id="nav">')
		.cycle({
        fx: 'scrollRight', // choose your transition type, ex: fade, scrollUp, scrollRight, shuffle
				pager:  '#nav'
    }); 
});
</script>
<style>
*{margin:0;padding:0;}
body{
	font-family:Tahoma, Arial, sans-serif;
	padding:20px;
	}
/* testimonials: */
#testimonials1, #testimonials2 {
width:330px;
background:#E7E9E6;
border:1px solid #D8D9D6;
margin:10px 0;
 
}
#testimonials1 blockquote, #testimonials2 blockquote{
padding:10px;
width:300px !important;
font-family:Georgia, "Times New Roman", Times, serif;
font-style:italic;
color:#808080;
display:block;
}
 
#testimonials1 blockquote p, #testimonials2 blockquote p{
margin: 0 !important;padding: 5px!important;
 
}
#testimonials1 blockquote cite, #testimonials2 blockquote cite {
font-style: normal;
display: block;
 
text-transform: uppercase;
font-weight: bold;
font-style:italic;
color: #555;
padding-left:5px;
margin-top:10px;
}
 
.nav { margin: 5px 0 }
 
#nav a, #s7 strong { margin: 0 5px; padding: 3px 5px; border: 1px solid #ccc; background: #fc0; text-decoration: none }
 
#nav a.activeSlide { background: #ea0 }
 
#nav a:focus { outline: none; }
</style>
<h2>Testimonials</h2>
<br />
  <div id="testimonials1">
<% @testimonials.each do |testimonial| %>
	
	<blockquote>
		<p> <%= testimonial.description[0..150]  %> <%= link_to "..read more" ,testimonial_path(testimonial) %>
    <cite>&ndash;<%= testimonial.title %></cite></p>
		<p><%= link_to "Edit",edit_testimonial_path(testimonial) if link_for_admin %></p>
		<p><%= link_to 'Delete', testimonial, confirm: 'Are you sure?', method: :delete if link_for_admin %></p>
	</blockquote>

<% end %>
</div>
<p><%= link_to 'create New', new_testimonial_path if link_for_admin %></p>
<br />

